<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich"
    template="layout/template.xhtml">

<ui:define name="body">

    <rich:panel>
        <f:facet name="header">Commentonsuggestion Details</f:facet>


        <s:decorate id="msg" template="layout/display.xhtml">
            <ui:define name="label">Msg</ui:define>
            <h:outputText value="#{commentonsuggestionHome.instance.msg}"/>
        </s:decorate>

        <s:decorate id="createDate" template="layout/display.xhtml">
            <ui:define name="label">Create date</ui:define>
            <h:outputText value="#{commentonsuggestionHome.instance.createDate}">
                <s:convertDateTime type="both" dateStyle="short"/>
            </h:outputText>
        </s:decorate>

        <div style="clear:both"/>

    </rich:panel>

    <div class="actionButtons">

        <s:button view="/CommentonsuggestionEdit.xhtml"
                    id="edit"
                 value="Edit"/>

        <s:button view="/#{empty commentonsuggestionFrom ? 'CommentonsuggestionList' : commentonsuggestionFrom}.xhtml"
                    id="done"
                 value="Done"/>

    </div>

    <rich:tabPanel switchType="ajax">

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/manytoone.gif" style="vertical-align: middle; padding-right: 4px;"/>Suggestioninfo</h:panelGroup>
        </f:facet>
    <div class="association" id="suggestioninfoParent">

        <h:outputText value="There is no suggestioninfo associated with this commentonsuggestion."
                   rendered="#{commentonsuggestionHome.instance.suggestioninfo == null}"/>

        <rich:dataTable var="_suggestioninfo"
                   value="#{commentonsuggestionHome.instance.suggestioninfo}"
                rendered="#{commentonsuggestionHome.instance.suggestioninfo != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="suggestioninfoTable">
            <h:column>
                <f:facet name="header">Id suggestion info</f:facet>
                <h:outputText value="#{_suggestioninfo.idSuggestionInfo}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Create date</f:facet>
                <h:outputText value="#{_suggestioninfo.createDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Info msg</f:facet>
                <h:outputText value="#{_suggestioninfo.infoMsg}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Quality</f:facet>
                <h:outputText value="#{_suggestioninfo.quality}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Last comment date</f:facet>
                <h:outputText value="#{_suggestioninfo.lastCommentDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </h:column>
            <h:column styleClass="action">
                <f:facet name="header">Action</f:facet>
                <s:link id="viewsuggestioninfo"
                     value="View"
                      view="/Suggestioninfo.xhtml">
                    <f:param name="suggestioninfoIdSuggestionInfo"
                           value="#{_suggestioninfo.idSuggestionInfo}"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </div>
    </rich:tab>

    <rich:tab>
        <f:facet name="label">
            <h:panelGroup><h:graphicImage value="/img/manytoone.gif" style="vertical-align: middle; padding-right: 4px;"/>User</h:panelGroup>
        </f:facet>
    <div class="association" id="userParent">

        <h:outputText value="There is no user associated with this commentonsuggestion."
                   rendered="#{commentonsuggestionHome.instance.user == null}"/>

        <rich:dataTable var="_user"
                   value="#{commentonsuggestionHome.instance.user}"
                rendered="#{commentonsuggestionHome.instance.user != null}"
              rowClasses="rvgRowOne,rvgRowTwo"
                      id="userTable">
            <h:column>
                <f:facet name="header">Id user</f:facet>
                <h:outputText value="#{_user.idUser}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Login</f:facet>
                <h:outputText value="#{_user.login}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Password</f:facet>
                <h:outputText value="#{_user.password}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Name</f:facet>
                <h:outputText value="#{_user.name}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Surname</f:facet>
                <h:outputText value="#{_user.surname}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Birth date</f:facet>
                <h:outputText value="#{_user.birthDate}">
                    <s:convertDateTime type="date" dateStyle="short"/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Create date</f:facet>
                <h:outputText value="#{_user.createDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Modify date</f:facet>
                <h:outputText value="#{_user.modifyDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Delete date</f:facet>
                <h:outputText value="#{_user.deleteDate}">
                    <s:convertDateTime type="both" dateStyle="short"/>
                </h:outputText>
            </h:column>
            <h:column>
                <f:facet name="header">Type</f:facet>
                <h:outputText value="#{_user.type}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Calculated rate</f:facet>
                <h:outputText value="#{_user.calculatedRate}"/>
            </h:column>
            <h:column>
                <f:facet name="header">Enabled</f:facet>
                <h:outputText value="#{_user.enabled}"/>
            </h:column>
            <h:column styleClass="action">
                <f:facet name="header">Action</f:facet>
                <s:link id="viewuser"
                     value="View"
                      view="/User.xhtml">
                    <f:param name="userIdUser"
                           value="#{_user.idUser}"/>
                </s:link>
            </h:column>
        </rich:dataTable>

    </div>
    </rich:tab>
</rich:tabPanel>
</ui:define>

</ui:composition>
